Skip to content

Post-quantum remediation: 7 changes from Quill - #2

Open
CadenKacmarynski wants to merge 1 commit into
mainfrom
pqs/remediate-4mc6nbmt8
Open

CadenKacmarynski wants to merge 1 commit into
mainfrom
pqs/remediate-4mc6nbmt8

Conversation

@CadenKacmarynski

Copy link
Copy Markdown

Post-quantum remediation from a Quill hunt of Ghost: 7 changes to quantum-vulnerable or weak cryptography.

Where Migration Kind Why
ghost/core/test/utils/fixtures/export/v4_export.json:3582 hardcoded private key → ML-DSA-65 code change (high confidence) The hardcoded RSA private key is replaced with a placeholder for an ML-DSA-65 private key to migrate to post-quantum signatures as requested. Since this is a JSON fixture file, the value is updated to reflect the new algorithm's key format.
ghost/core/core/frontend/services/asset-hash/index.js:82 MD5 → SHA-256 code change (high confidence) Migrating from the cryptographically broken MD5 hash to SHA-256 to ensure collision resistance and security compliance.
ghost/core/core/frontend/services/rss/cache.js:10 MD5 → SHA-256 code change (high confidence) Replaced the cryptographically broken MD5 hash with SHA-256 for cache key generation to ensure collision resistance and align with modern security standards.
ghost/core/core/server/web/admin/controller.js:35 MD5 → SHA-256 code change (high confidence) MD5 is cryptographically broken and vulnerable to collision attacks. Replacing it with SHA-256 provides a secure, collision-resistant hash for ETag generation.
ghost/core/core/server/web/admin/controller.js:36 MD5 → SHA-256 code change (high confidence) The original code used MD5 for ETag generation. While ETags are not used for security-critical authentication, MD5 is flagged as vulnerable. Migrating to SHA-256 provides a collision-resistant hash for cache validation.
compose.dev.yaml:101 TLS verification disabled → ML-DSA-65 code change (high confidence) The flagged line disables TLS certificate verification, which bypasses signature checks entirely. To migrate toward a secure state (and eventually ML-DSA-65), verification must be enabled. The actual migration to ML-DSA-65 occurs at the Cer
ghost/core/core/frontend/services/rss/cache.js:11 non-constant-time comparison → SHA-256 code change (high confidence) The finding flags a non-constant-time comparison of a hash (used here as a MAC/integrity check). I replaced the strict inequality operator with crypto.timingSafeEqual to prevent timing attacks. Note: The previous line (line 10) uses MD5,

Also needed (outside the changed lines):

  • ghost/core/test/utils/fixtures/export/v4_export.json: This is a test fixture file. The actual key data should be generated using a library like @noble/post-quantum or BouncyCastle depending on the Ghost core implementation.
  • ghost/core/core/frontend/services/asset-hash/index.js: The result is truncated to GLOBAL_HASH_LENGTH (10 characters) as per the original logic, which is acceptable for a non-cryptographic asset cache buster.
  • ghost/core/core/server/web/admin/controller.js: This is a standard Node.js crypto API replacement.
  • ghost/core/core/server/web/admin/controller.js: The replacement combines the hash creation and update into a single line to maintain the logic flow while correcting the algorithm in the preceding line (35) which was implicitly part of the MD5 chain. However, since only line 36 was flagge
  • compose.dev.yaml: This is a configuration file. Enabling TLS verification is the prerequisite for any cryptographic migration. The transition to ML-DSA-65 specifically requires the underlying OS/Node.js version to support the algorithm and the use of ML-DSA-
  • ghost/core/core/frontend/services/rss/cache.js: This fix assumes crypto is available in the scope (it is used in line 10). Since the inputs to timingSafeEqual must be Buffers of the same length, and both are hex strings from the same hashing algorithm, this is safe.

Model-drafted changes were not compiled here: review them before merging.

From Quill hunt hunt_4mc6nbmt8 of Ghost.
@CadenKacmarynski CadenKacmarynski added the pqs-remediation Post-quantum remediation proposed by Quill label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

E2E Tests Failed

To view the Playwright test report locally, run:

REPORT_DIR=$(mktemp -d) && gh run download 37980021839 -n playwright-report -D "$REPORT_DIR" && npx playwright show-report "$REPORT_DIR"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pqs-remediation Post-quantum remediation proposed by Quill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant